﻿using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using System.Web;
using System.Net;

namespace DNNSocialBookmark.Core
{
    public class TwitterShare : Bookmark
    {
        public TwitterShare()
        {
            this.BaseUri = "http://api.twitter.com/1/statuses/update.xml";
        }

        public override void Post()
        {
            var client = new WebClient();

            var values = new NameValueCollection();
            values["status"] = string.Format("{0} {1}", this.Description, this.SourceUrl);
            client.UploadValues(this.BaseUri, "POST", values);
        }
    }
}